package com.runner.tutorial;

import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.runner.observer.Event;
import com.runner.observer.Subject;
import com.runner.utility.Locator;

public class AprilTutorial extends Tutorial {
	

	public AprilTutorial(Subject subject, BitmapFont font) {
		super(subject, font);
		completed = Locator.getUnlocks().isAprilTutorial();
		if(!completed){
			Locator.setOverallGameSpeed(0);
		}
		tips.add("April can jump high by tapping and holding the right side of the screen");
		tips.add("Tap and hold again to float");
		tips.add("She can also slide by tapping the left side of the screen");
		tips.add("Good Luck!\n\nTap to start!");
		
		next();
	}

	@Override
	public void render() {
		if (!completed) {
			sb.begin();
			background.draw(sb, ACTUAL_VIRTUAL_WIDTH * 0.25f, ACTUAL_VIRTUAL_HEIGHT * 0.6f, ACTUAL_VIRTUAL_WIDTH * 0.5f,
					ACTUAL_VIRTUAL_HEIGHT * 0.4f);
			font.drawWrapped(sb, display, ACTUAL_VIRTUAL_WIDTH * 0.29f,
					ACTUAL_VIRTUAL_HEIGHT * 0.93f, ACTUAL_VIRTUAL_WIDTH * 0.43f);
			sb.end();
		}
	}

	@Override
	public void update(float delta) {
		if (!completed) {

		}

	}

	@Override
	public void next() {
		if(count < tips.size()){
			super.next();
		} else {
			subject.notify(Event.EVENT_APRIL_TUTORIAL_COMPLETE);
			completed=true;
			Locator.setOverallGameSpeed(1);
		}
	}

}
